https://leetcode.cn/problems/n-ary-tree-level-order-traversal/description/
class Solution {
public:
    vector<vector<int>> levelOrder(Node* root) {
        vector<vector<int>> ret;

        if(root==nullptr)
            return ret;
        queue<Node*> q;
        q.push(root);
        while(!q.empty())
        {
            int k=q.size();
            vector<int> tmp;
            while(k--)
            {
                Node* t=q.front();
                tmp.push_back(t->val);
                q.pop();
                for(Node* child:t->children)
                {
                    if(child!=nullptr)
                        q.push(child);
                }
            }
            ret.push_back(tmp);
        }
        return ret;
    }
};